function change_privacy(track_id, privacy) {
   function callback() {
       if (req.readyState == 4) {
           if (req.status == 200) {
               // update the HTML DOM based on whether or not message is valid
           }
       }
   }

   var req;
   var url = "?page=chgvis&track=" + encodeURIComponent(track_id) + "&vis=" + encodeURIComponent(privacy);
   if (typeof XMLHttpRequest != "undefined") {
       req = new XMLHttpRequest();
   } else if (window.ActiveXObject) {
       req = new ActiveXObject("Microsoft.XMLHTTP");
   }
   req.open("GET", url, true);
   req.onreadystatechange = callback;
   req.send(null);
}
